package com.example.voting_master.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.voting_master.entity.UserVoteLog;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UserVoteLogService extends IService<UserVoteLog> {
    /**
     *  根据用户ip获取用户当天的投票记录
     * */
    List<UserVoteLog> getUserVoteLogTodayByIp(String ip, Long theme_id);

    /**
     *  添加用户投票记录
     * */
    boolean addUserVoteLog(String ip,Long candidate_id,Long theme_id);

    /**
     * 发起用户投票
     * */
    String user_vote(HttpServletRequest request, UserVoteLog userVoteLog);
}
